package com.handa.documentManager.feign;

import com.handa.common.entity.Response;
import com.handa.common.entity.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "admin-service", url = "http://localhost:19091")
public interface AdminFeignClient {

    @PostMapping("/Admin/sysUser/queryone")
    Response<SysUser> getUserByUserName(@RequestParam("username") String username);

    @GetMapping("/Admin/sysConfig/getSysConfig")
    Response<String> getConfigByName(@RequestParam String configName);

    @PostMapping("/Admin/sysConfig/saveOrUpdateSysConfig")
    Response<String> saveOrUpdateSysConfig(@RequestBody Map<String, Object> config);

    @PostMapping("/Admin/sysConfig/deleteSysConfig")
    Response<?> deleteSysConfig(@RequestParam String ConfigName);

}
